package com.qianfeng.gl4study.youshare.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created with IntelliJ IDEA.
 * I'm glad to share my knowledge with you all.
 * User:Gaolei
 * Date:2015/2/26
 * Email:pdsfgl@live.com
 */
public class CollectDatabasesHelper extends SQLiteOpenHelper {

	public static final int VERSION = 1;
	public static final String TABLE_COLLECT_ITEM = "product_favorites";
	public static final String CREATE_TABLE_COLLECT_ITEM =
			"create table " + TABLE_COLLECT_ITEM + " (" +
					"_id integer primary key autoincrement," +
					"productId text not null,"+
					"count text not null,"+
					"productName text not null,"+
					"productPrice float default 0.0,"+
					"productThumb text,"+
					"user_id text,"+
					"checked int default 0)";

	public CollectDatabasesHelper(Context context) {
		super(context, "databases4collect", null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_TABLE_COLLECT_ITEM);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}
}
